template
On this page
Plugin Template
This is a template for creating plugins for simply-xp.
[JS] myPlugin Template
Section titled “[JS] myPlugin Template”const MyNewPlugin = { name: "myPlugin", // [REQUIRED] The name of your plugin initialize: async (xp) => { // [REQUIRED] Called during plugin registration // do something with xp }, requiredVersions: ["2"], // [OPTIONAL] Recommended: match any v2 release};
export default MyNewPlugin; // Export your plugin, so users can register it[JS] Registering myPlugin
Section titled “[JS] Registering myPlugin”const { registerPlugins } = require("simply-xp");const { MyNewPlugin } = require("myPlugin");
(async () => { await registerPlugins([MyNewPlugin]);})().catch(console.error); // Returns the error